﻿<Window x:Class="OrbitOne.CRMLyncInfoDashboard.Setup.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="CRM Dashboard for Lync Installer" 
        Height="350" 
        Width="525">

    <StackPanel Orientation="Vertical" Width="300">
        <Image Source="Images/logo_only_orbit_240_black_gif.jpg" Height="42" Width="209" 
               Margin="10 10 10 50"/>

        <TextBlock Text="URL of the CRM Server:" 
                   Margin="10 10 10 0"/>
        
        <TextBox Margin="10 5 10 10">
            <TextBox.Text>
                <Binding Path="Url" 
                         Mode="TwoWay"
                         UpdateSourceTrigger="PropertyChanged">
                    <Binding.ValidationRules>
                        <DataErrorValidationRule />                        
                    </Binding.ValidationRules>
                </Binding>
            </TextBox.Text>
        </TextBox>                    
        
        <CheckBox Content="Open dashboard by default for all conversations" 
                  Margin="10 10 10 10"
                  IsChecked="{Binding DashboardInstaller.OpenByDefault, Mode=TwoWay}"/>
        
        <Button Content="{Binding InstallButtonContent}" 
                Margin="10 10 10 10"
                CommandParameter="{Binding DashboardInstaller}"
                Command="{Binding InstallCommand}"/>

        <Button Content="Remove the CRM Dashboard from the Lync client" 
                Margin="10 10 10 10"                
                CommandParameter="{Binding DashboardInstaller}"
                Command="{Binding UninstallCommand}"/>

    </StackPanel>

</Window>
